package org.tong.controller;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class ThymeleafController {

    @RequestMapping("/")
    public String toIndex() {
        return "/index";
    }

    @ResponseBody
    @RequestMapping("/ctr")
    public String getController() {
        return String.join("-", "The address of controller is ", "" + System.identityHashCode(this));
    }
}
